﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace TERP.WaterClient.Views.Common
{
	public partial class FrmErrorMessage : XtraForm
	{
		public FrmErrorMessage()
		{
			InitializeComponent();
		}

		private void FrmErrorMessage_Load(object sender, EventArgs e)
		{
			this.btnClose.Text = "Đóng";
		}


		/// <summary>
		/// 
		/// </summary>
		/// <param name="msgError"></param>
		/// <param name="detailError"></param>
		public void SetErrorMessage(string msgError,string detailError){
			this.lblMessage.Text = msgError;
			this.memoEditErrorDetail.Text = detailError;
		}

		private void btnClose_Click(object sender, EventArgs e)
		{
			this.Close();
		}

		private void lblMessage_Resize(object sender, EventArgs e)
		{
			this.memoEditErrorDetail.Top = this.lblMessage.Top + this.lblMessage.Height + 8;
			this.memoEditErrorDetail.Height = this.btnClose.Top - 8 - memoEditErrorDetail.Top;
		}
	}
}
